using System;
using System.Collections.Generic;
using System.ByteBuffer;
using tools;

namespace thirteen
{
    /// <summary>
    /// generate by msg tool
    /// 所有玩家准备，准备结束
    /// </summary>
	public class ResReadyOverMsg : ResMessage
	{
		//发牌的玩家
		public List<long> players = new List<long>();
		
		//玩家手牌
		public List<int> cards = new List<int>();
		

        
		public void write(object obj)
		{
            ByteBuffer b = obj as ByteBuffer;
			b.PushInt(players.Count);

			foreach (var element in players)
			{
				b.PushLong(element);
				
			}
			b.PushInt(cards.Count);

			foreach (var element in cards)
			{
				b.PushInt(element);
				
			}
			
		}

	    public void read(object obj)
		{
            MyConverter b = obj as MyConverter;
			int players_length = b.toInt32();
			for (int i = 0; i < players_length; ++i)
			{
				players.Add(b.toInt64());
				
			}
			int cards_length = b.toInt32();
			for (int i = 0; i < cards_length; ++i)
			{
				cards.Add(b.toInt32());
				
			}
			
		}

		public int Id
		{
            get { return 621217; }
		}

        public String Desc
        {
            get { return "所有玩家准备，准备结束"; }
        }
	}
}